package org.pine.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 响应结果编码枚举
 *
 * @author pine
 * @version 1.0
 * @since 2025-04-10 18:04
 */
@Getter
@AllArgsConstructor
public enum ResultCodeEnum implements BaseEnum {
    SUCCESS(0, ""),
    ARGS_EXCEPTION(100, "参数异常"),
    ARGS_MISSING_EXCEPTION(101, "参数缺失"),
    ARGS_INVALID_EXCEPTION(102, "无效参数"),
    VALID_EXCEPTION(103, "参数校验异常"),
    DATA_EXCEPTION(150, "数据异常"),
    DATA_NOT_FOUND_EXCEPTION(151, "数据不存在"),
    SIGN_INVALID_EXCEPTION(152, "签名无效"),
    NETWORK_EXCEPTION(200, "网络异常"),
    NETWORK_CONNECT_TIMEOUT(201, "网络连接超时"),
    NETWORK_READ_TIMEOUT(202, "网络数据读取超时"),
    NETWORK_WRITE_TIMEOUT(203, "网络数据写超时"),
    UPLOAD_FILE_ERROR(301, "上传文件异常"),
    UPLOAD_FILE_LIMIT(302, "上传文件超过限额"),
    EXCEL_FILE_EXCEPTION(303, "Excel异常"),
    FOLDER_OR_FILE_NOT_EXISTED_EXCEPTION(304, "文件夹或文件不存在"),
    FOLDER_OR_FILE_NOT_PIC_EXCEPTION(305, "请上传图片"),
    DOWNLOAD_FILE_EXCEPTION(306, "文件下载失败"),
    USER_NOT_AUTHORIZED(401, "用户未授权"),
    USER_NOT_EXISTS_EXCEPTION(402, "用户不存在"),
    USER_NOT_LOGIN_EXCEPTION(403, "用户未登录"),
    PASS_ERROR(404, "登录服务异常"),
    REGISTER_UNFINISHED(405, "服务商注册，信息未补全"),
    DROPDOWN_DATA_TOO_LARGE(406, "下拉框数据量太大，请增加搜索条件"),
    MQ_PRODUCE_ERROR(410, "发送MQ异常"),
    MQ_CONSUME_ERROR(411, "消费MQ异常"),
    UNEXPECTED_EXCEPTION(500, "服务内部异常!"),
    FREQUENT_ACCESS_EXCEPTION(600, "访问频繁!"),
    SERVER_NOT_FOUND_EXCEPTION(700, "未找到处理的服务!"),
    ;
    private final Integer code;
    private final String desc;
}
